﻿angular.module('Caltech').directive('hasAccess', function (Constants) {
    'use strict';

    return {
        restrict: 'A',
        link: function (scope, element, attrs) {
            if (attrs['hasAccess'].split(',').indexOf(Constants.accountInfo.roleName) === -1) {
                element.remove();
            }
        }
    }
});
